Skip to content

feat: Document how to use the HTTP client override parameter#530

Open
marcelomendoncasoares wants to merge 1 commit into
serverpod:mainfrom
marcelomendoncasoares:http-client-override
Open

feat: Document how to use the HTTP client override parameter#530
marcelomendoncasoares wants to merge 1 commit into
serverpod:mainfrom
marcelomendoncasoares:http-client-override

Conversation

@marcelomendoncasoares
Copy link
Copy Markdown
Collaborator

Documentation for serverpod/serverpod#5134.

@marcelomendoncasoares marcelomendoncasoares requested a review from a team May 19, 2026 12:19
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between "Calling endpoints" and "Working with endpoints" is ambiguous to a user. Working with endpoints should contain the basic use cases, and calling endpoints is about configuring the request to the server.

Suggested renaming "Configure HTTP calls".

Note: Use the active voice when possible (i.e., Configure, rather than Configuration)

..connectivityMonitor = FlutterConnectivityMonitor();
```

## Connecting from a different device
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we rename it to "Configure HTTP calls", this should move back to "Working with endpoints". It's a basic use case users will run into.

@@ -0,0 +1,134 @@
# Calling endpoints

When you run `serverpod generate` after defining endpoints on your server, Serverpod creates a `Client` class in your client package with typed methods for each endpoint. This `client` is used to call the endpoints on the server as if they were local methods.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the renaming, we can remove "Initializing the client" from here, which is a duplication from "Working with endpoints". We rewrite the introduction to explain why overriding the HTTP client is necessary to configure the HTTP calls.

```

:::info
Note that, if you use the [`httpClientOverride` parameter](./working-with-endpoints/calling-endpoints#http-client-override), you need to provide the security context through the client being passed to `httpClientOverride`. You cannot set `securityContext` and `httpClientOverride` on the same client.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing a code example showcasing this. Change this from an info note to a section covering this, with a heading and a code example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants